<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c"  uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>查看用车申请</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">
    <link rel="stylesheet" href="<%=request.getContextPath()%>/static/layui/layui/css/layui.css" media="all" />
    <link rel="stylesheet" href="<%=request.getContextPath()%>/static/css/public.css" media="all" />
</head>
<body class="childrenBody">
<form class="layui-form" method="post" id="applyForm">
    <br/><br/>
    <div class="layui-form-item">
        <label class="layui-form-label">申请单单号</label>
        <div class="layui-input-inline">
            <input type="text" id="applyno" name="applyno" required  lay-verify="required" autocomplete="off" class="layui-input" value="${applyUse.applyno}" disabled>
        </div>
        <label class="layui-form-label">申请人</label>
        <div class="layui-input-inline">
            <input type="text" id="applyuser" name="applyuser" required  lay-verify="required" autocomplete="off" class="layui-input" value="${applyUse.user.realname }" disabled>
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">用车人</label>
        <div class="layui-input-inline">
            <input type="text" id="caruser" name="caruser" required  lay-verify="required" placeholder="请输入用车人姓名" autocomplete="off" class="layui-input" value="${applyUse.caruser}" disabled>
        </div>
        <label class="layui-form-label">司机</label>
        <div class="layui-input-inline">
            <input type="text" id="carplate" name="carplate" required  lay-verify="required" autocomplete="off" class="layui-input" value="${applyUse.car.driver.dirvername}" placeholder="暂无出车" disabled>
            </select>
        </div>
    </div>


    <div class="layui-form-item">
        <label class="layui-form-label">用车时间:</label>
        <div class="layui-input-inline">
            <input type="text" name="usestarttime" id="usestarttime" required  lay-verify="required" placeholder="请输入用车时间" class="layui-input usetime" value="<fmt:formatDate value="${applyUse.usestarttime}"  type="both" />" disabled>
        </div>
        <label class="layui-form-label">预计归还:</label>
        <div class="layui-input-inline">
            <input type="text" id="useendtime" name="useendtime" required  lay-verify="required" placeholder="请输入预计归还时间" autocomplete="off" class="layui-input usetime" value="<fmt:formatDate value="${applyUse.useendtime}"  pattern="yyyy-MM-dd HH:mm:ss" />" disabled>
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">出发地点:</label>
        <div class="layui-input-inline">
            <input type="text" id="go" name="go" required  lay-verify="required" placeholder="请输入出发地点" autocomplete="off" class="layui-input" value="${applyUse.go}" disabled>
        </div>
        <label class="layui-form-label">目的地:</label>
        <div class="layui-input-inline">
            <input type="text" id="back" name="back" required  lay-verify="required" placeholder="请输入目的地" autocomplete="off" class="layui-input" value="${applyUse.back}" disabled>
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">事由及说明:</label>
        <div class="layui-input-block">
            <textarea name="remark" id="remark" cols="76" rows="12" disabled>
                ${applyUse.remark}
            </textarea>
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">申请单进度:</label>
        <div class="layui-input-inline">
            <input type="text" id="status" name="status" required  lay-verify="required" placeholder="请输入目的地" autocomplete="off" disabled class="layui-input"
            <c:if test="${applyUse.status == 1}">
                    value="用车中"
            </c:if>
            <c:if test="${applyUse.status == 2}">
                   value="待发车"
            </c:if>
            <c:if test="${applyUse.status == 3}">
                   value="待审批"
            </c:if>
            <c:if test="${applyUse.status == 4}">
                   value="审批未通过"
            </c:if>
            <c:if test="${applyUse.status == 5}">
                   value="正常结束"
            </c:if>
            <c:if test="${applyUse.status == 6}">
                   value="非正常结束"
            </c:if>
            >
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">审批人:</label>
        <div class="layui-input-inline">
            <input type="text"  autocomplete="off" class="layui-input" value="${check.checkuser}" disabled>
        </div>
        <label class="layui-form-label">审批时间:</label>
        <div class="layui-input-inline">
            <input type="text"  autocomplete="off" class="layui-input" value="<fmt:formatDate value="${check.checktime}"  pattern="yyyy-MM-dd HH:mm:ss" />" disabled>
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">审批意见:</label>
        <div class="layui-input-block">
            <textarea cols="76" rows="12" disabled>
                ${check.remark}
            </textarea>
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">派车人:</label>
        <div class="layui-input-inline">
            <input type="text"  autocomplete="off" class="layui-input" value="${applyUse.sendcaruser}" disabled>
        </div>
        <label class="layui-form-label">派车时间:</label>
        <div class="layui-input-inline">
            <input type="text"  autocomplete="off" class="layui-input" value="<fmt:formatDate value="${applyUse.sendcartime}"  pattern="yyyy-MM-dd HH:mm:ss" />" disabled>
        </div>
    </div>

    <div class="layui-form-item">
        <div class="layui-input-block">
            <button class="layui-btn" lay-submit lay-filter="applyAdd" id="closeBtn" >关闭</button>
        </div>
    </div>

</form>
<script type="text/javascript" src="<%=request.getContextPath()%>/static/layui/layui/layui.js"></script>
<script>
    layui.use(['form','layer','laydate','table','laytpl','upload'],function(){
        var form = layui.form,
            layer = parent.layer === undefined ? layui.layer : top.layer,
            $ = layui.jquery,
            laydate = layui.laydate,
            laytpl = layui.laytpl,
            table = layui.table,
            upload=layui.upload;

        //关闭按钮的实现
        $("#closeBtn").click(function () {
            window.parent.location.reload();
        })

    })
</script>
</body>
</html>